package com.mengyu.moeisland

import android.content.Intent
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.mengyu.ldrouter.RouterJump
import com.mengyu.login.LoginActivty
import com.mengyu.moeisland.databinding.ActivityMainBinding


class MainActivity : AppCompatActivity() {

    lateinit var viewBing: ActivityMainBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        viewBing = ActivityMainBinding.inflate(layoutInflater)
        setContentView(viewBing.root)
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
            val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
            insets
        }
        viewBing.tvCkLogin.setOnClickListener {
            RouterJump.getInstance.open(it.context,"hb://baidu/ldlogin/login")
//            startActivity(Intent(this,LoginActivty::class.java))
        }
    }
}